 // 数据处理：另存为

 import React, { Component } from 'react';
 import { Col, Form, Input,Radio, Row } from 'antd';
 import './modal.css';
 import PropTypes from 'prop-types';
 import {connect} from 'react-redux';
 
 
 
 class SaveDoc1 extends Component {
   
   static propTypes = {
     docInfo: PropTypes.object.isRequired,
     setForm: PropTypes.func.isRequired,
   };
 
   formRef = React.createRef();
 
   componentDidMount() {
     this.props.setForm(this.formRef);
   }
 
   render() {
     return (
       <Form 
         ref={this.formRef}   
         name="control-ref" 
         onFinish={this.onFinish} 
         initialValues={{
          //radio_group: "data",
          doc_name: this.props.docInfo.title,
        }}  
       > 
         <Row>
           <Col span={2}></Col>
           <Col span={22}>
             <Form.Item name="radio_group" label="保存类型" rules={[{ required: true,message:"请选择保存类型！" }]}>
                <Radio.Group>
                  <Radio value="data">仅数据</Radio>
                  <Radio value="mb">仅模板</Radio>
                  <Radio value="data+mb">绘图文件</Radio>
                </Radio.Group>
             </Form.Item>
           </Col>
         </Row>
         <Row>
           <Col span={2}></Col>
           <Col span={19}>
             <Form.Item name="doc_name" label="文件名称" rules={[{ required: true, message: "文件名称不能为空！"}]}>
                <Input />
             </Form.Item>
           </Col>
         </Row>    
       </Form>
     );
   }
 }
 
 export default connect(
   state => ({docData: state.docData}),
   {}
 )(SaveDoc1);